/**
 * Created by limeng on 16/9/1.
 */
indexApp.controller("NewProposalListCtrl", function ($scope, $http, $controller) {
    $controller("ListPageCtrl", {$scope: $scope, $http: $http});
    $scope.isProposal = true;
    $scope.title = "最新提案";

    $scope.updateContent = function() {
        $scope.searchMap.pageSize = parseInt($scope.pageSize);
        $scope.searchMap.pageNo = parseInt($scope.pageNo);
        $http.get('/proposal/newProposalList/'+
            parseInt($scope.pageSize)+"/"+parseInt($scope.pageNo)).success(function (data) {
            if (data.state == true) {
                $scope.articles = data.list;
                $scope.pageCount = data.pageCount;
            }
        });
    };

    $scope.updateContent();
});